feat(goal): sync blocked lifecycle and user abort handling - #382
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aborted,abortSource) and use it to block only user-interrupted active goals; the next real user run resumes them./todo, builtin identity, and persistence-key adaptations.Provenance
Verification
npm run checkat repository rootnpx vitest run goal goal-extension goal-turn-usage goal-modules goal-store goal-abort-extension app-server-thread-goal todo builtin-extension-sync(144 tests)local-ignore/qa-evidence/20260726-goal-todo-resync/goal-abort-extension.test.tssupplies the deterministic ESC-abort proof.Summary by cubic
Syncs the goal builtin to
pi-goal@0.3.0and todo tools topi-todotools@0.2.0, adding a blocked goal lifecycle, JSONL goal history, 4,000‑char objective truncation with spill files, and explicit user/system abort attribution so only user‑aborted turns block and the next user‑triggered run resumes.New Features
blockedwith a non-empty reason; persisted asblockedReason/blockedAt; no auto-continue while blocked; the next user run resumes to active.agent_endnow includesabortedandabortSource; user-aborted active turns are markedblockedafter usage accounting; system aborts do not block.<thread>.objective-full.txt; tool responses include a truncation notice.create_goalreplaces a completed goal and appends the old goal to<thread>.history.jsonl; rejected if an unfinished goal exists.update_goalsupportscompleteandblocked(requiresreasonforblocked, rejectsreasonforcomplete); guidance updated to avoid premature blocking and to audit repeated blocks;create_goaldocs note limits and replacement; thread API exposesblockedon get whilethread/goal/setstill rejects settingblockeddirectly.blockedturns; continuation suppressed while blocked; UI shows “Goal blocked: ”; thread wire includesblockedstatus.Dependencies
pi-goalto0.3.0.pi-todotoolsto0.2.0.Written for commit 01144db. Summary will update on new commits.